package org.example.course.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Classname ResultObj
 * @Description 返回类
 * @Date 2020/2/8 16:08
 * @Created by
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultObj {
    private Integer code;

    private String msg;

    public static final ResultObj LOGIN_SUCCESS = new ResultObj(Constast.OK, "登陆成功");
    public static final ResultObj LOGIN_ERROR_PASS = new ResultObj(Constast.ERROR, "登陆失败,用户名或密码不正确");
    public static final ResultObj LOGIN_ERROR_CODE = new ResultObj(Constast.ERROR, "登陆失败,验证码不正确");

    public static final ResultObj UPDATE_SUCCESS = new ResultObj(Constast.OK, "更新成功");
    public static final ResultObj UPDATE_ERROR = new ResultObj(Constast.ERROR, "更新失败");


    public static final ResultObj RESET_SUCCESS = new ResultObj(Constast.OK, "重置成功");
    public static final ResultObj RESET_ERROR = new ResultObj(Constast.ERROR, "重置失败");

    public static final ResultObj CREATE_SUCCESS = new ResultObj(Constast.OK, "添加成功");
    public static final ResultObj CREATE_ERROR = new ResultObj(Constast.ERROR, "添加失败");
    public static final ResultObj DELETE_ID_NULL = new ResultObj(-1, "传入ID不能为空");


    public static final ResultObj DELETE_SUCCESS = new ResultObj(Constast.OK, "删除成功");
    public static final ResultObj DELETE_ERROR = new ResultObj(Constast.ERROR, "删除失败");

    public static final ResultObj OPERATE_SUCCESS = new ResultObj(Constast.OK, "操作成功");
    public static final ResultObj OPERATE_ERROR = new ResultObj(Constast.ERROR, "操作失败");


    public static final ResultObj COMMON_WARN_ID_SHOULD_INTEGER = new ResultObj(Constast.ERROR, "ID前台传入必须为数字");
    public static final ResultObj AT_LEAST_ONE_LOW = new ResultObj(Constast.ERROR, "必须选择至少一行！");
    public static final ResultObj NO_FILE = new ResultObj(Constast.ERROR, "上传失败，请选择文件");


    public static final ResultObj EXECL_SUCCESS = new ResultObj(Constast.OK, "模板已成功到本地E盘根目录下!");


}
